<template>
	<view v-for="item in items">
		<uni-row style="margin-top:16rpx;margin-bottom: 10px;">
			<uni-col :span="8">
				<text class="apt">电子校</text>
				<text class="unit">58</text>
				<progress class="pro"/>
				<text class="aptName">PM2.5</text>
			</uni-col>
			<uni-col :span="8" style="text-align: center;">
				<text class="apt"></text>
				<text class="unit">ug/m3</text>
				<progress class="pro"/>
				<text class="aptName">PM10</text>
			</uni-col>
			<uni-col :span="8" style="text-align: center;">
				<text class="apt"></text>
				<text class="unit">ppm</text>
				<progress class="pro"/>
				<text class="aptName">CO2</text>
			</uni-col>
		</uni-row>
		<uni-section title="通栏卡片" type="line">
			<uni-card title="基础卡片" :isFull="true" sub-title="副标题" extra="额外信息" :thumbnail="avatar">
				<text class="uni-body">这是一个通栏卡片 ，通栏没有外边距，左右会贴合父元素。</text>
			</uni-card>
		</uni-section>
		<view>
			
		</view>
	</view>
</template>

<script>
	export default {
		components:{
			
		},
		data(){
			return {
				userFavorite:{
					name:'hello',
					pm25:"12",
					image:"../../static/uni.png",
				}
			}
		},
		onLoad(){
			this.getMyFavorite();
		},
		methods:{
			getMyFavorite(){
				this.$request(this.$api.favoriteList,{}).then(res=>{
					console.log(res);
					this.userFavorite.name = res.result[0].name;
					this.userFavorite.pm25 = res.result[0].data.pm25;
					if(res.result.image != null)
						this.userFavorite.image = res.result.image;
				})
			}
		}
	}	
</script>

<style>
</style>